package com.chuangjiangx.member.manager.web.web.stored.request;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;

/**
 * @author cj-ch
 * @date 2018/4/4 下午4:09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MbrRefundRequest {
    /**
     * 当前用户密码
     * md5加密传输
     */
    @NotBlank
    private String password;

    /**
     * 退款金额
     */
    @NotNull
    @DecimalMin(value = "0.01",message = "退款金额不能小于0.01元")
    private BigDecimal amount;

    /**
     * 订单编号
     */
    @NotBlank
    @Size(min = 18,max = 64,message = "订单编号长度为18-64位")
    private String orderNumber;

    /**
     * 退款终端
     */
    @NotNull(message = "退款终端不能为null")
    private Integer terminal;
}
